public <T> List<T> findByProperties(
		Class<T> c, String[] pnList, Object[] values) 
			throws Exception{
	Session session = getLocalSession();
	Criteria cr = session.createCriteria(c);
	for(int i = 0; i<pnList.length; i++){
		cr.add(Restrictions.eq(pnList[i], values[i]));
	}
	result = cr.list();
	if(result == null) result = new ArrayList<T>();
	return result;
}
